From 20fafa287adec1382257622fc23bd6f58b09f3a2 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 19 Jan 2024 00:26:17 -0800
Subject: feat: root prefix all links

---
 src/routes/user/[user]/+page.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/routes/user/[user]/+page.svelte')

diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte
index 5adbeaaa..4637234a 100644
--- a/src/routes/user/[user]/+page.svelte
+++ b/src/routes/user/[user]/+page.svelte
@@ -2,6 +2,7 @@
 	import { user, type User } from '$lib/AniList/user';
 	import HeadTitle from '$lib/Home/HeadTitle.svelte';
 	import { estimatedDayReading } from '$lib/Media/Manga/time';
+	import root from '$lib/Utility/root.js';
 	import { onMount } from 'svelte';
 
 	export let data;
@@ -60,7 +61,7 @@
 							title={String(userData.id)}>@{userData.name}</a
 						>
 						<span class="click-item">•</span>
-						<a href={`/user/${userData.name}/badges`}>Badge Wall</a>
+						<a href={root(`/user/${userData.name}/badges`)}>Badge Wall</a>
 					</p>
 
 					{data.username} has watched {(userData.statistics.anime.minutesWatched / 60 / 24).toFixed(
@@ -70,7 +71,7 @@
 
 					<p />
 
-					{data.username} has collected {#await fetch(`/api/badges?id=${userData.id}`)}
+					{data.username} has collected {#await fetch(root(`/api/badges?id=${userData.id}`))}
 						...
 					{:then badges}
 						{#await badges.json()}
-- 
cgit v1.2.3

